Rewards Analytics and Distribution Dashboard¶

This goal of this notebook is to offer an easy way to process the outputs of the praise and sourcecred reward systems, perform an analysis of the results and calculate the token reward distribution. It uses mock data and should be considered a work-in-progress.

Imports¶

First, we import the relevant libraries, get the Data and set how many tokens we want to distribute

Now that we have selected the files, we can import them for processing. We can also set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.

Tip: Now that the file paths are set, you can safely click on "Cell > Run all below" from here on the menu bar to execute everything :)

Parameters¶

Set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.

Results Analysis¶

Let's dive into some data analysis! We'll use the metrics designed and explained by octopus🐙, and focus only on the praise rewards for now. Starting with:

Allocation percentages - Praise receivers¶

This table will show us which percentage of the total rewards gets distributed to which top % of users. So "Top 50% -> 0.85" would mean that the top 50% of praisees received 85% of the total rewards

Out[8]:
Rewards
Top 50% 0.944352
Top 20% 0.712005
Top 10% 0.497617
Top 5% 0.322359
Top 1% 0.092784

Allocation Percentages - Praise givers¶

This table will show us which percentage of the total rewards get distributed based on praise given by which top % of users. So "Top 50% -> 0.85" would mean that 85% of the total rewards are based on praise given by the top 50% praise givers.

Out[10]:
Rewards
Top 50% 0.963308
Top 20% 0.826072
Top 10% 0.654473
Top 5% 0.544064
Top 1% 0.325019

Plotting praise given against praise received¶

Now we can compare the relationship between praise given by a user and the praise they received

Gini coefficient¶

Next we will look at the Gini coefficient. Note that there is some debate if we want to use this metric at all, since it is usually employed to measure wealth distribution, and not compensation.

Out[12]:
Rewards
All 0.676756
Top 50% 0.457938
Top 20% 0.273441

Shannon Entropy¶

Shannon Entropy) is a concept from communications theory, which is also used in measuring the diversity of a distribution. The formula for calculating Shannon Entropy among $n$ individuals is $$\\sum_{k=1}^n -p_k log_2(p_k),$$ where $p_k$ represents the proportion of the resource that user $k$ received.

Here we compare the actual Shannon Entropy with the maximum possible for the dataset, keeping in mind that a Shannon Entropy of 0 would mean one user holds all the rewards

Out[13]:
Rewards
Entropy 5.055404
Max Entropy 6.266787
% of Max 0.806698

Nakamoto Coefficient¶

Last but not least, the Nakamoto coefficient. The Nakamato Coefficient is defined as the smallest number of accounts who control at least 50% of the resource. Although its significance relates to the prospect of a 51% attack on a network, which may not be relevant in our context, we can still use it as an intuitive measure of how many individuals received the majority of a resource.

Out[14]:
9

Praise Data Visualization¶

Rating distribution¶

Since praise gets valued on a scale, we can take a look at how often each value of the scale gets assigned by quantifiers.

Praise Reward Distribution¶

We can also take a look at the distribution of the received praise rewards

Praise Outliers¶

To aid the revision process, we can generate a table which sorts the praise by the size of the spread between the highest and lowest scores. These "controversial" praise instances can then be discussed in the quantifier review call. Index numbers are kept to make localization in the "big praise sheet" easier.

Out[17]:
index ID DATE TO USER ACCOUNT FROM USER ACCOUNT REASON SCORE 1 SCORE 2 SCORE 3 DUPLICATE ID 1 DUPLICATE ID 2 DUPLICATE ID 3 DISMISSED 1 DISMISSED 2 DISMISSED 3 QUANTIFIER 1 USERNAME QUANTIFIER 2 USERNAME QUANTIFIER 3 USERNAME AVG SCORE SPREAD
0 405 621f79e143b89009366c8677 2021-07-28T22:00:00.000Z karmaticacid#1218 Vyvy-vi#5040 for recording the GIVeconomy talk, and saving ... 144 0 55 None None None False True False Usua◎ Silver#2618 liviade#1387 shawn#7046 99 144
1 326 621f79e143b89009366c85c2 2021-07-18T22:00:00.000Z liviade#1387 griff (💜, 💜)#8888 for being brave enough to let it happen 144 5 1 None None None False False False Usua◎ Silver#2618 tigeroid#2951 divine_comedian#5493 50 143
2 506 621f79e143b89009366c86ee 2021-07-30T22:00:00.000Z natesuits#4789 iviangita#3204 for parameters content in the forum 144 8 1 None None 621f79e143b89009366c86d1 False False False Usua◎ Silver#2618 tigeroid#2951 shawn#7046 52 143
3 547 621f79e143b89009366c8717 2021-07-30T22:00:00.000Z griff (💜, 💜)#8888 Mount Manu#3530 for their work building the Commons Configurat... 2 144 34 621f79e143b89009366c868a None None False False False AmwFund#0979 bends#3537 shawn#7046 60 142
4 10 621f79e143b89009366c846e 2021-07-12T22:00:00.000Z JeffEmmett#7202 griff (💜, 💜)#8888 for hacking on the buckets for Praisemaggeden ... 144 3 21 None None None False False False Usua◎ Silver#2618 bends#3537 calazki#3961 56 141
5 521 621f79e143b89009366c86fd 2021-07-30T22:00:00.000Z sem 🐝#0161 Mount Manu#3530 for all the dancing 144 5 3 None None None False False False Usua◎ Silver#2618 bends#3537 shawn#7046 50 141
6 410 621f79e143b89009366c867c 2021-07-28T22:00:00.000Z Alp#3768 Mount Manu#3530 for a 2-hour onboarding session full of questi... 144 8 3 None None None False False False Usua◎ Silver#2618 bends#3537 Mettodo#7010 51 141
7 24 621f79e143b89009366c847c 2021-07-12T22:00:00.000Z liviade#1387 griff (💜, 💜)#8888 for jumping in and observing the Praise Audit ... 144 3 13 None None None False False False Usua◎ Silver#2618 tigeroid#2951 divine_comedian#5493 53 141
8 0 621f79e143b89009366c841c 2021-07-11T22:00:00.000Z Suga#8514 Vyvy-vi#5040 for making edits in the welcome text 3 3 144 None None None False False False Tam2140#9361 Vyvy-vi#5040 Mettodo#7010 50 141
9 145 621f79e143b89009366c8502 2021-07-15T22:00:00.000Z acidlazzer#5796 iviangita#3204 for all of their contributions to comms 144 3 5 None None 621f79e143b89009366c841e False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 49 141
10 593 621f79e143b89009366c8745 2021-07-30T22:00:00.000Z Alp#3768 Mount Manu#3530 for devoting 20 minutes to going through our C... 144 3 3 None None None False False False Usua◎ Silver#2618 bends#3537 Mettodo#7010 50 141
11 496 621f79e143b89009366c86e4 2021-07-30T22:00:00.000Z acidlazzer#5796 iviangita#3204 for helping with Gravity’s infographics 144 14 5 None 621f79e143b89009366c867b 621f79e143b89009366c841e False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 48 139
12 376 621f79e143b89009366c8606 2021-07-25T22:00:00.000Z karmaticacid#1218 griff (💜, 💜)#8888 for helping me write and rewrite the forum pos... 144 5 55 None None None False False False Usua◎ Silver#2618 liviade#1387 shawn#7046 68 139
13 168 621f79e143b89009366c8519 2021-07-15T22:00:00.000Z liviade#1387 iviangita#3204 for the Impact Hour spreadsheet 144 5 14 None None 621f79e143b89009366c8514 False False False Usua◎ Silver#2618 tigeroid#2951 divine_comedian#5493 51 139
14 548 621f79e143b89009366c8718 2021-07-30T22:00:00.000Z markop#2007 Mount Manu#3530 for their work building the Commons Configurat... 144 5 5 None 621f79e143b89009366c865e 621f79e143b89009366c865e False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 49 139
15 191 621f79e143b89009366c8530 2021-07-15T22:00:00.000Z Nuggan#5183 iviangita#3204 for jumping in params, giving feedback and ask... 144 5 89 None None None False False False Usua◎ Silver#2618 liviade#1387 shawn#7046 79 139
16 526 621f79e143b89009366c8702 2021-07-30T22:00:00.000Z OddName#8763 iviangita#3204 for the amazing brainstorming around governanc... 144 13 5 None None None False False False Usua◎ Silver#2618 Vyvy-vi#5040 Mettodo#7010 54 139
17 409 621f79e143b89009366c867b 2021-07-28T22:00:00.000Z acidlazzer#5796 Juankbell#7458 for helping with Gravity's infographics! this ... 144 5 14 None None 621f79e143b89009366c865c False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 50 139
18 384 621f79e143b89009366c865c 2021-07-25T22:00:00.000Z acidlazzer#5796 David (please DYOR...)#4116 for relentlessly pumping out the graphics💛 144 5 21 None None None False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 56 139
19 128 621f79e143b89009366c84f1 2021-07-15T22:00:00.000Z Nuggan#5183 iviangita#3204 for making the params parties work out 144 5 14 None None 621f79e143b89009366c8530 False False False Usua◎ Silver#2618 liviade#1387 shawn#7046 52 139
20 288 621f79e143b89009366c859b 2021-07-15T22:00:00.000Z sem 🐝#0161 iviangita#3204 for engaging in discussion on the TE Commons F... 144 5 55 None None None False False False Usua◎ Silver#2618 bends#3537 shawn#7046 68 139
21 425 621f79e143b89009366c868b 2021-07-28T22:00:00.000Z markop#2007 divine_comedian#5493 for their work building to the commons config ... 144 8 5 None None 621f79e143b89009366c865e False False False Usua◎ Silver#2618 liviade#1387 calazki#3961 52 139
22 264 621f79e143b89009366c8579 2021-07-15T22:00:00.000Z iviangita#3204 Mount Manu#3530 for stewarding this community successfully int... 5 144 8 None None None False False False Tam2140#9361 bends#3537 divine_comedian#5493 52 139
23 594 621f79e143b89009366c8746 2021-07-30T22:00:00.000Z Alp#3768 Mount Manu#3530 for diving deep into the TEC, devoting several... 144 34 8 None None None False False False Usua◎ Silver#2618 bends#3537 Mettodo#7010 62 136
24 220 621f79e143b89009366c854d 2021-07-15T22:00:00.000Z liviade#1387 Mount Manu#3530 for helping Zer8 around 144 8 8 None None None False False False Usua◎ Silver#2618 tigeroid#2951 divine_comedian#5493 53 136

We can also plot the spread against the average score for a more visual search.
ATTENTION! Keep in mind that this is just meant as a visual aid. If there are several praise instances with similar spread and average quant number, all but one end up "hidden" on the chart. For the full list you have to use the table.

Praise Flows¶

Now for something more fun: let's surface the top "praise flows" from the data. Thanks to @inventandchill for this awesome visualization! On one side we have the top 20 praise givers separately (modifiable by changing the variable n_senders), on the other the top 25 receivers (modifiable by changing the variable n_receivers). The people outside the selection get aggregated into the "REST FROM" and "REST TO" categories.

Out[20]:

SourceCred Data¶

SourceCred token Distribution¶

Next we can see the distribution made by the SourceCred algorithm.

Quantifier Data¶

Let's take a closer look at each quantifier. In the following step we will use the raw praise data to zoom in on how each quantifier scored the praises:

Amount of praise quantified¶

With the above table we can easily see how much praise each quantifier rated.

Mean praise score by quantifier¶

Let's see the mean praise scores every quantifier gave.

Total Token Distribution Visualization and Export¶

To send the allocations to the DAO for distribution, we need to put all data together and add the rewards for the reward board and the quantifiers.

Let's take a final look at the total distribution. Click on the legend to filter out specific reward sources

That's it! We can now download the final distribution files and upload them to GitHub for future reference. We want to export 3 different files:
 - The final reward allocations, separated by source
 - The final reward allocations, in a disperse.app-readable format
 - The extended praise data, detailing the how many tokens each single praise netted (for future reference)